<?php

require_once 'phpmoko/ui/Form/FormBase.php';

class HiddenValue extends FormBase
{
	private $value = null;
	
	function __construct()
	{
		parent::__construct();
	}
	
	function setValue($value)
	{
		$this->value = $value;
	}
	
	function toString()
	{
		$str = '<input';

		if ($this->id != null)
			$str .= ' id="'.$this->id.'"';

		if ($this->name != null)
			$str .= ' name="'.$this->name.'"';

		if ($this->value != null)
			$str .= ' value=\''.htmlspecialchars($this->value).'\'';
			
		$str .= ' type="hidden">';
			
		return $str;
	}
}
?>